<template>
  <div class="box" :style="{ width: width }">
    <div class="box_icon" :style="{backgroundImage:'url('+icon+')'}"></div>
    <div>
      <div class="box_title">{{ title }}</div>
      <div><span class="box_value">{{ value }}</span><span class="box_unit">{{ unit }}</span></div>
    </div>
  </div>
</template>
<script setup>
import { defineProps, onMounted } from "vue"
const props = defineProps({
  icon: {
    type: String,
    default: ""
  },
  width: {
    type: String,
    default: "100%"
  },
  title: {
    type: String,
    default: ""
  },
  value: {
    type: String,
    default: "0"
  },
  unit: {
    type: String,
    default: ""
  }
})

onMounted(() => {})
</script>
<style scoped lang="less">
.box {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  .box_icon{
    width: 35px;
    height: 40px;
    background-size: 35px 40px;
    margin-right: 5px;
  }
  .box_title{
    font-family: Inter;
    font-weight: 400;
    font-size: 12px;
    font-style: italic;
    line-height: 16.94px;
    letter-spacing: 0%;
    color: rgba(255, 255, 255, 0.8);
  }
  .box_value{
    font-family: Inter;
    font-weight: 600;
    font-style: italic;
    font-size: 14px;
    line-height: 24.2px;
    letter-spacing: 0%;
    padding: 0 5px 0 0;
    background-clip: text;
    color: transparent;
    background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
                linear-gradient(180deg, rgba(0, 204, 255, 0) 20.83%, #00CCFF 89.58%);

  }
  .box_unit{
    font-family: Inter;
    font-weight: 400;
    font-size: 10px;
    font-style: italic;
    line-height: 16.94px;
    letter-spacing: 0%;
    color: rgba(255, 255, 255, 0.8);
  }
}
</style>
